<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Channels_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[parent_id]">
                {foreach $parentList as $k=>$v}
                <option  value="{$v['id']}">{$v.platename}</option>
                {/foreach}
            </select>
            <!--<input id="c-parent_id" data-rule="required" min="0" data-source="parent/index" class="form-control selectpage" name="row[parent_id]" type="text" value="">-->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Post_title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-post_title" data-rule="required" class="form-control" name="row[post_title]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Post_keywords')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-post_keywords" data-rule="required" class="form-control" name="row[post_keywords]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Post_source')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-post_source" data-rule="required" class="form-control" name="row[post_source]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Post_excerpt')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-post_excerpt" data-rule="required" class="form-control" name="row[post_excerpt]" type="text" value="">
        </div>
    </div>
    <div class="form-group" data-field="thumbnail">
        <label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('Thumbnail')}</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[thumbnail]" type="text" value="" placeholder="缩略图可以直接从正文进行提取,可以为空">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>
        </div>
    </div>
<!--    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Post_content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-post_content" class="form-control editor" rows="5" name="row[post_content]" cols="50">NULL</textarea>
        </div>
    </div>-->
    <div class="form-group" data-field="content">
        <label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('Post_content')}</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" data-rule="" class="form-control editor" name="row[post_content]" rows="15"></textarea>
            <div style="margin-top:5px;">
                <a href="javascript:" class="btn btn-xs btn-primary btn-legal"><i class="fa fa-magic"></i> {:__('Check content is legal')}</a>
                <a href="javascript:" class="btn btn-xs btn-danger btn-keywords"><i class="fa fa-file"></i> {:__('Get the keyword and description')}</a>
                <a href="javascript:" class="btn btn-xs btn-info btn-getimage" data-toggle="tooltip" data-title="将提取内容第一张图作为缩略图"><i class="fa fa-camera"></i> {:__('提取缩略图')}</a>
                <a href="javascript:" class="btn btn-xs btn-info btn-getimages" data-toggle="tooltip" data-title="将提取内容前4张图作为组图"><i class="fa fa-camera"></i> {:__('提取组图')}</a>
                <!--<a href="javascript:" class="btn btn-xs btn-success btn-paytag" data-toggle="tooltip" data-title="只针对付费文章有效"><i class="fa fa-cny"></i> {:__('付费可见标签')}</a>-->
                <button type="button" class="btn btn-xs btn-success btn-pagertag"><i class="fa fa-list"></i> {:__('文章分页标签')}</button>
            </div>
        </div>
    </div>
   <input  name="row[post_type]" type="hidden" value="1">
<!--    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Post_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-post_type" data-rule="required" min="0" class="form-control" name="row[post_type]" type="number" value="1">
        </div>
    </div>-->
<!--    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Post_format')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-post_format" data-rule="required" min="0" class="form-control" name="row[post_format]" type="number" value="1">
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" min="0" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
        </div>
    </div>
<!--    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Post_status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-post_status" data-rule="required" min="0" class="form-control" name="row[post_status]" type="number" value="1">
        </div>
    </div>-->

    
    <div class="form-group tf tf-channel tf-list">
        <label class="control-label col-xs-12 col-sm-2">{:__('Comment_status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-iscontribute" name="row[iscomment]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-iscontribute" data-yes="1" data-no="0">
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group tf tf-channel tf-list">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_top')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-iscontribute" name="row[is_top]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-iscontribute" data-yes="1" data-no="0">
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group tf tf-channel tf-list">
        <label class="control-label col-xs-12 col-sm-2">{:__('Recommended')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-iscontribute" name="row[recommended]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-iscontribute" data-yes="1" data-no="0">
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </div>
    </div>
<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Comment_count')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-comment_count" data-rule="required" min="0" class="form-control" name="row[comment_count]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Post_favorites')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-post_favorites" data-rule="required" min="0" class="form-control" name="row[post_favorites]" type="number" value="0">
        </div>
    </div>
  <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Post_hits')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-post_hits" data-rule="required" min="0" class="form-control" name="row[post_hits]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Post_status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[post_status]', ['1'=>__('发布'), '0'=>__('隐藏')])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-create_time"  min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Published_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-published_time"  min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" data-rule="required" name="row[published_time]" type="text" value="">
        </div>
    </div>

    <!--    会员价格-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Membership_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-membership_price" class="form-control" name="row[membership_price]" type="number" step="any" min="0" data-rule="required;range(0~)" value="0">
        </div>
    </div>

    <!--    会员时长-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Membership_duration')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-membership_duration" class="form-control" name="row[membership_duration]" type="number" step="1" min="0" data-rule="required;digits;integer;range(0~)" value="0">
        </div>
    </div>
 

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
